﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.GameObject
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System.Runtime.CompilerServices;
using System.Security;
using UnityEngine.Internal;
using UnityEngine.SceneManagement;
using UnityEngineInternal;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Base class for all entities in Unity Scenes.</para>
  /// </summary>
  public sealed class GameObject : Object
  {
    /// <summary>
    ///   <para>Creates a game object with a primitive mesh renderer and appropriate collider.</para>
    /// </summary>
    /// <param name="type">The type of primitive object to create.</param>
    public static  GameObject CreatePrimitive(PrimitiveType type)
    {
      throw new NotImplementedException();
    }

    [SecuritySafeCritical]
    public unsafe T GetComponent<T>()
    {
      CastHelper<T> castHelper = new CastHelper<T>();
      this.GetComponentFastPath(typeof (T), new IntPtr((void*) &castHelper.onePointerFurtherThanT));
      return castHelper.t;
    }

    /// <summary>
    ///   <para>The non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of Component to search for.</param>
    /// <returns>
    ///   <para>A Component of the matching type, otherwise null if no Component is found.</para>
    /// </returns>
    public  Component GetComponent(System.Type type)
    {
      throw new NotImplementedException();
    }

    internal  void GetComponentFastPath(System.Type type, IntPtr oneFurtherThanResultValue)
    {
      throw new NotImplementedException();
    }
    
    internal  Component GetComponentByName(string type)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>The string-based version of this method.</para>
    /// </summary>
    /// <param name="type">The name of the type of Component to search for.</param>
    /// <returns>
    ///   <para>A Component of the matching type, otherwise null if no Component is found.</para>
    /// </returns>
    public Component GetComponent(string type) => this.GetComponentByName(type);

    /// <summary>
    ///   <para>This is the non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of Component to retrieve.</param>
    /// <param name="includeInactive">Whether to include inactive child GameObjects in the search.</param>
    /// <returns>
    ///   <para>A component of the matching type, if found.</para>
    /// </returns>
    public  Component GetComponentInChildren(System.Type type, bool includeInactive)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>This is the non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of Component to retrieve.</param>
    /// <param name="includeInactive">Whether to include inactive child GameObjects in the search.</param>
    /// <returns>
    ///   <para>A component of the matching type, if found.</para>
    /// </returns>
    [TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
    public Component GetComponentInChildren(System.Type type)
    {
      return this.GetComponentInChildren(type, false);
    }

    [ExcludeFromDocs]
    public T GetComponentInChildren<T>() where T : Component => this.GetComponentInChildren<T>(false);

    public T GetComponentInChildren<T>([UnityEngine.Internal.DefaultValue("false")] bool includeInactive)where T : Component
    {
      return (T) this.GetComponentInChildren(typeof (T), includeInactive);
    }

    /// <summary>
    ///   <para>The non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of component to search for.</param>
    /// <param name="includeInactive">Whether to include inactive parent GameObjects in the search.</param>
    /// <returns>
    ///   <para>A Component of the matching type, otherwise null if no Component is found.</para>
    /// </returns>
    [TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
    public  Component GetComponentInParent(System.Type type, bool includeInactive)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>The non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of component to search for.</param>
    /// <param name="includeInactive">Whether to include inactive parent GameObjects in the search.</param>
    /// <returns>
    ///   <para>A Component of the matching type, otherwise null if no Component is found.</para>
    /// </returns>
    [TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
    public Component GetComponentInParent(System.Type type)
    {
      return this.GetComponentInParent(type, false);
    }

    [ExcludeFromDocs]
    public T GetComponentInParent<T>() where T : Component => this.GetComponentInParent<T>(false);

    public T GetComponentInParent<T>([UnityEngine.Internal.DefaultValue("false")] bool includeInactive)where T : Component
    {
      return (T) this.GetComponentInParent(typeof (T), includeInactive);
    }

    private  Array GetComponentsInternal(
      System.Type type,
      bool useSearchTypeAsArrayReturnType,
      bool recursive,
      bool includeInactive,
      bool reverse,
      object resultList)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>The non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of component to search for.</param>
    /// <returns>
    ///   <para>An array containing all matching components of type type.</para>
    /// </returns>
    public Component[] GetComponents(System.Type type)
    {
      return (Component[]) this.GetComponentsInternal(type, false, false, true, false, (object) null);
    }

    public T[] GetComponents<T>()
    {
      return (T[]) this.GetComponentsInternal(typeof (T), true, false, true, false, (object) null);
    }

    public void GetComponents(System.Type type, List<Component> results)
    {
      this.GetComponentsInternal(type, false, false, true, false, (object) results);
    }

    public void GetComponents<T>(List<T> results)
    {
      this.GetComponentsInternal(typeof (T), true, false, true, false, (object) results);
    }

    /// <summary>
    ///   <para>The non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of component to search for.</param>
    /// <param name="includeInactive">Whether to include inactive child GameObjects in the search.</param>
    /// <returns>
    ///   <para>An array of all found components matching the specified type.</para>
    /// </returns>
    [ExcludeFromDocs]
    public Component[] GetComponentsInChildren(System.Type type)
    {
      bool includeInactive = false;
      return this.GetComponentsInChildren(type, includeInactive);
    }

    /// <summary>
    ///   <para>The non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of component to search for.</param>
    /// <param name="includeInactive">Whether to include inactive child GameObjects in the search.</param>
    /// <returns>
    ///   <para>An array of all found components matching the specified type.</para>
    /// </returns>
    public Component[] GetComponentsInChildren(System.Type type, [UnityEngine.Internal.DefaultValue("false")] bool includeInactive)
    {
      return (Component[]) this.GetComponentsInternal(type, false, true, includeInactive, false, (object) null);
    }

    public T[] GetComponentsInChildren<T>(bool includeInactive)
    {
      return (T[]) this.GetComponentsInternal(typeof (T), true, true, includeInactive, false, (object) null);
    }

    public void GetComponentsInChildren<T>(bool includeInactive, List<T> results)
    {
      this.GetComponentsInternal(typeof (T), true, true, includeInactive, false, (object) results);
    }

    public T[] GetComponentsInChildren<T>() => this.GetComponentsInChildren<T>(false);

    public void GetComponentsInChildren<T>(List<T> results)
    {
      this.GetComponentsInChildren<T>(false, results);
    }

    [ExcludeFromDocs]
    public Component[] GetComponentsInParent(System.Type type)
    {
      bool includeInactive = false;
      return this.GetComponentsInParent(type, includeInactive);
    }

    /// <summary>
    ///   <para>The non-generic version of this method.</para>
    /// </summary>
    /// <param name="type">The type of component to search for.</param>
    /// <param name="includeInactive">Whether to include inactive parent GameObjects in the search.</param>
    /// <returns>
    ///   <para>An array of all found components matching the specified type.</para>
    /// </returns>
    public Component[] GetComponentsInParent(System.Type type, [UnityEngine.Internal.DefaultValue("false")] bool includeInactive)
    {
      return (Component[]) this.GetComponentsInternal(type, false, true, includeInactive, true, (object) null);
    }

    public void GetComponentsInParent<T>(bool includeInactive, List<T> results)
    {
      this.GetComponentsInternal(typeof (T), true, true, includeInactive, true, (object) results);
    }

    public T[] GetComponentsInParent<T>(bool includeInactive)
    {
      return (T[]) this.GetComponentsInternal(typeof (T), true, true, includeInactive, true, (object) null);
    }

    public T[] GetComponentsInParent<T>() => this.GetComponentsInParent<T>(false);

    [SecuritySafeCritical]
    public unsafe bool TryGetComponent<T>(out T component)
    {
      CastHelper<T> castHelper = new CastHelper<T>();
      this.TryGetComponentFastPath(typeof (T), new IntPtr((void*) &castHelper.onePointerFurtherThanT));
      component = castHelper.t;
      return (object) castHelper.t != null;
    }

    public bool TryGetComponent(System.Type type, out Component component)
    {
      component = this.TryGetComponentInternal(type);
      return (Object) component != (Object) null;
    }

    [TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
    internal  Component TryGetComponentInternal(System.Type type)
    {
      throw new NotImplementedException();
    }

    internal  void TryGetComponentFastPath(System.Type type, IntPtr oneFurtherThanResultValue)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Returns one active GameObject tagged tag. Returns null if no GameObject was found.</para>
    /// </summary>
    /// <param name="tag">The tag to search for.</param>
    public static GameObject FindWithTag(string tag) => GameObject.FindGameObjectWithTag(tag);

    /// <summary>
    ///   <para></para>
    /// </summary>
    /// <param name="methodName"></param>
    /// <param name="options"></param>
    public void SendMessageUpwards(string methodName, SendMessageOptions options)
    {
      this.SendMessageUpwards(methodName, (object) null, options);
    }

    /// <summary>
    ///   <para></para>
    /// </summary>
    /// <param name="methodName"></param>
    /// <param name="options"></param>
    public void SendMessage(string methodName, SendMessageOptions options)
    {
      this.SendMessage(methodName, (object) null, options);
    }

    /// <summary>
    ///   <para></para>
    /// </summary>
    /// <param name="methodName"></param>
    /// <param name="options"></param>
    public void BroadcastMessage(string methodName, SendMessageOptions options)
    {
      this.BroadcastMessage(methodName, (object) null, options);
    }

    internal  Component AddComponentInternal(string className)
    {
      throw new NotImplementedException();
    }

    private  Component Internal_AddComponentWithType(System.Type componentType)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Adds a component class of type componentType to the game object. C# Users can use a generic version.</para>
    /// </summary>
    /// <param name="componentType"></param>
    [TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
    public Component AddComponent(System.Type componentType)
    {
      return this.Internal_AddComponentWithType(componentType);
    }

    public T AddComponent<T>() where T : Component => this.AddComponent(typeof (T)) as T;

    /// <summary>
    ///   <para>The Transform attached to this GameObject.</para>
    /// </summary>
    public  Transform transform { get
    {
      throw new NotImplementedException();
    } }

    /// <summary>
    ///   <para>The layer the GameObject is in.</para>
    /// </summary>
    public  int layer { get
    {
      throw new NotImplementedException();
    }
      set
    {
      throw new NotImplementedException();
    } }


    /// <summary>
    ///   <para>ActivatesDeactivates the GameObject, depending on the given true or false/ value.</para>
    /// </summary>
    /// <param name="value">Activate or deactivate the object, where true activates the GameObject and false deactivates the GameObject.</param>
    public  void SetActive(bool value)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>The local active state of this GameObject. (Read Only)</para>
    /// </summary>
    public  bool activeSelf {get
    {
      throw new NotImplementedException();
    } }

    /// <summary>
    ///   <para>Defines whether the GameObject is active in the Scene.</para>
    /// </summary>
    public  bool activeInHierarchy { get
    {
      throw new NotImplementedException();
    } }


    /// <summary>
    ///   <para>Gets and sets the GameObject's StaticEditorFlags.</para>
    /// </summary>
    public  bool isStatic { get
    {
      throw new NotImplementedException();
    }
      set
      {
        throw new NotImplementedException();
      } }

    internal bool isStaticBatchable
    {
      get
      {
        throw new NotImplementedException();
      }
    }

    /// <summary>
    ///   <para>The tag of this game object.</para>
    /// </summary>
    public string tag
    {
      get
      {
        throw new NotImplementedException();
      }
      set
      {
        throw new NotImplementedException();
      }
    }

    /// <summary>
    ///   <para>Is this game object tagged with tag ?</para>
    /// </summary>
    /// <param name="tag">The tag to compare.</param>
    public  bool CompareTag(string tag)
    {
      throw new NotImplementedException();
    }

    public static  GameObject FindGameObjectWithTag(string tag)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Returns an array of active GameObjects tagged tag. Returns empty array if no GameObject was found.</para>
    /// </summary>
    /// <param name="tag">The name of the tag to search GameObjects for.</param>
    public static  GameObject[] FindGameObjectsWithTag(string tag)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.</para>
    /// </summary>
    /// <param name="methodName">The name of the method to call.</param>
    /// <param name="value">An optional parameter value to pass to the called method.</param>
    /// <param name="options">Should an error be raised if the method doesn't exist on the target object?</param>
    public  void SendMessageUpwards(
      string methodName,
      [UnityEngine.Internal.DefaultValue("null")] object value,
      [UnityEngine.Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.</para>
    /// </summary>
    /// <param name="methodName">The name of the method to call.</param>
    /// <param name="value">An optional parameter value to pass to the called method.</param>
    /// <param name="options">Should an error be raised if the method doesn't exist on the target object?</param>
    [ExcludeFromDocs]
    public void SendMessageUpwards(string methodName, object value)
    {
      SendMessageOptions options = SendMessageOptions.RequireReceiver;
      this.SendMessageUpwards(methodName, value, options);
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.</para>
    /// </summary>
    /// <param name="methodName">The name of the method to call.</param>
    /// <param name="value">An optional parameter value to pass to the called method.</param>
    /// <param name="options">Should an error be raised if the method doesn't exist on the target object?</param>
    [ExcludeFromDocs]
    public void SendMessageUpwards(string methodName)
    {
      SendMessageOptions options = SendMessageOptions.RequireReceiver;
      object obj = (object) null;
      this.SendMessageUpwards(methodName, obj, options);
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object.</para>
    /// </summary>
    /// <param name="methodName">The name of the method to call.</param>
    /// <param name="value">An optional parameter value to pass to the called method.</param>
    /// <param name="options">Should an error be raised if the method doesn't exist on the target object?</param>
    public  void SendMessage(string methodName, [UnityEngine.Internal.DefaultValue("null")] object value, [UnityEngine.Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object.</para>
    /// </summary>
    /// <param name="methodName">The name of the method to call.</param>
    /// <param name="value">An optional parameter value to pass to the called method.</param>
    /// <param name="options">Should an error be raised if the method doesn't exist on the target object?</param>
    [ExcludeFromDocs]
    public void SendMessage(string methodName, object value)
    {
      SendMessageOptions options = SendMessageOptions.RequireReceiver;
      this.SendMessage(methodName, value, options);
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object.</para>
    /// </summary>
    /// <param name="methodName">The name of the method to call.</param>
    /// <param name="value">An optional parameter value to pass to the called method.</param>
    /// <param name="options">Should an error be raised if the method doesn't exist on the target object?</param>
    [ExcludeFromDocs]
    public void SendMessage(string methodName)
    {
      SendMessageOptions options = SendMessageOptions.RequireReceiver;
      object obj = (object) null;
      this.SendMessage(methodName, obj, options);
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object or any of its children.</para>
    /// </summary>
    /// <param name="methodName"></param>
    /// <param name="parameter"></param>
    /// <param name="options"></param>
    public  void BroadcastMessage(
      string methodName,
      [UnityEngine.Internal.DefaultValue("null")] object parameter,
      [UnityEngine.Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object or any of its children.</para>
    /// </summary>
    /// <param name="methodName"></param>
    /// <param name="parameter"></param>
    /// <param name="options"></param>
    [ExcludeFromDocs]
    public void BroadcastMessage(string methodName, object parameter)
    {
      SendMessageOptions options = SendMessageOptions.RequireReceiver;
      this.BroadcastMessage(methodName, parameter, options);
    }

    /// <summary>
    ///   <para>Calls the method named methodName on every MonoBehaviour in this game object or any of its children.</para>
    /// </summary>
    /// <param name="methodName"></param>
    /// <param name="parameter"></param>
    /// <param name="options"></param>
    [ExcludeFromDocs]
    public void BroadcastMessage(string methodName)
    {
      SendMessageOptions options = SendMessageOptions.RequireReceiver;
      object parameter = (object) null;
      this.BroadcastMessage(methodName, parameter, options);
    }

    /// <summary>
    ///   <para>Creates a new game object, named name.</para>
    /// </summary>
    /// <param name="name">The name that the GameObject is created with.</param>
    /// <param name="components">A list of Components to add to the GameObject on creation.</param>
    public GameObject(string name) => GameObject.Internal_CreateGameObject(this, name);

    /// <summary>
    ///   <para>Creates a new game object, named name.</para>
    /// </summary>
    /// <param name="name">The name that the GameObject is created with.</param>
    /// <param name="components">A list of Components to add to the GameObject on creation.</param>
    public GameObject() => GameObject.Internal_CreateGameObject(this, (string) null);

    /// <summary>
    ///   <para>Creates a new game object, named name.</para>
    /// </summary>
    /// <param name="name">The name that the GameObject is created with.</param>
    /// <param name="components">A list of Components to add to the GameObject on creation.</param>
    public GameObject(string name, params System.Type[] components)
    {
      GameObject.Internal_CreateGameObject(this, name);
      foreach (System.Type component in components)
        this.AddComponent(component);
    }

    private static  void Internal_CreateGameObject(GameObject self, string name)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Finds a GameObject by name and returns it.</para>
    /// </summary>
    /// <param name="name"></param>
    public static  GameObject Find(string name)
    {
      throw new NotImplementedException();
    }

    /// <summary>
    ///   <para>Scene that the GameObject is part of.</para>
    /// </summary>
    public Scene scene
    {
      get
      {
        Scene ret;
        this.get_scene_Injected(out ret);
        return ret;
      }
    }

    /// <summary>
    ///   <para>Scene culling mask Unity uses to determine which scene to render the GameObject in.</para>
    /// </summary>
    public  ulong sceneCullingMask {get
    {
      throw new NotImplementedException();
    } }

    internal Bounds CalculateBounds()
    {
      Bounds ret;
      this.CalculateBounds_Injected(out ret);
      return ret;
    }

    internal  int IsMarkedVisible()
    {
      throw new NotImplementedException();
    }

    public GameObject gameObject => this;

    

    [SpecialName]
    private  void get_scene_Injected(out Scene ret)
    {
      throw new NotImplementedException();
    }

    private  void CalculateBounds_Injected(out Bounds ret)
    {
      throw new NotImplementedException();
    }
  }
}
